package com.chinaunicom.controller;

import com.chinaunicom.entity.ResponseResult;
import com.chinaunicom.service.IPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ruiyanglee
 * @date: 2020-09-22 14:00
 * @description:
 */

@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private IPayService payService;

    @GetMapping("/msg")
    public ResponseResult getMsg() {
        return payService.getMsg();
    }

    @GetMapping("/port")
    public ResponseResult getPort() {
        return payService.getPort();
    }

    @GetMapping("/circuitBreak/{id}")
    public ResponseResult paymentCircuitBreaker(@PathVariable("id") Integer id) {
        return payService.paymentCircuitBreaker(id);
    }
}
